package com.huabo.contract.mysql.mapper;

import com.huabo.contract.mysql.entity.TblFundPoolMySql;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.BaseMapper;

public interface TblFundPoolMySqlMapper extends BaseMapper<TblFundPoolMySql> {

    @Insert("INSERT INTO Tbl_FundPool(FUNDPOOLID,FUNDPOOLNO,FUNDPOOLNAME) VALUES(#{id},#{no},#{name})")
    void insertTblFundPool(@Param("id") String id, @Param("no") String no, @Param("name") String name);

    @Update("UPDATE Tbl_FundPool SET FUNDPOOLNO = #{no} ,FUNDPOOLNAME = #{name} WHERE FUNDPOOLID = #{id}")
    void updateTblFundPool(@Param("id") String id, @Param("no") String no, @Param("name") String name) throws Exception;

    @Select("select count(*) from Tbl_FundPool where FUNDPOOLID=#{id}")
    Integer selectTblFundPool(@Param("id") String id);

}
